import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-09-28
 * Time: 19:30
 */

//基于form表单 构造get请求
@WebServlet("/formGet")
public class FormGet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //通过from表单 否早的get请求 收到请求后这里的服务器返回响应
        resp.setContentType("text/html;charset=utf8");
        resp.getWriter().write("这是你提交了get请求之后，返回的相应");
    }
}
